<?php

Yii::import('application.models._base.BaseStudentParentsDetails');

class StudentParentsDetails extends BaseStudentParentsDetails {

    public static function model($className = __CLASS__) {
        return parent::model($className);
    }

    public function rules() {
        return array(
            array('parent_name, address_line1,email_id, mobile_no, city,state_id', 'required'),
            array('email_id', 'email'),
            array('mobile_no,residence_phone_no, mobile_no', 'length', 'max' => 10),
            array('residence_phone_no, mobile_no, state_id', 'numerical', 'integerOnly' => true),
            array('parent_name, address_line1, address_line2, city, email_id', 'length', 'max' => 45),
            array('student_details_id', 'length', 'max' => 20),
            array('address_line2, city, residence_phone_no, email_id', 'default', 'setOnEmpty' => true, 'value' => null),
            array('id, parent_name, address_line1, address_line2, city, residence_phone_no, mobile_no, email_id, student_details_id, state_id', 'safe', 'on' => 'search'),
        );
    }

}